// import axios from '@/api/fetch';
// import SERVER from '@/api/server';
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 竞品车型查询
export const queryCompeteModels = params => axios.get(`${SERVER.CYXDMS_CLUE}/failModel/queryFailModelTable`, { params });
// 车型下拉无分页
export const selectCompeteModels = level => axios.post(`${SERVER.CYXDMS_CLUE}/failModel/queryFailModelList?level=${level}`, { level: Number(level) } );
// 跳转编辑页面
// export const queryCompeteModelsByid = id => axios.get(`${SERVER.CYXDMS_CLUE}/customerManage/industryCategory/mode/${id}`, { id: Number(id) });
// 新增保存
export const addCompeteModels = params => axios.post(`${SERVER.CYXDMS_CLUE}/basedata/failModels/addBrandFailModel`, params);
// 编辑保存
 export const editCompeteModels = params => axios.post(`${SERVER.CYXDMS_CLUE}/basedata/failModels/modifyBrandFailModel`, params);
//导出
// export const wholeExport = params => axios.get(`${SERVER.CYXDMS_CLUE}/basedata/failModels/wholeExport?type=${params}`, { params });
export const wholeExport = params => {
    return axios({
        url:`${SERVER.CYXDMS_CLUE}/basedata/failModels/wholeExport?type=${params}`,
        method:'get',
        // params:params,
        responseType: 'blob'
    });
  };

// 导入
export const importPackages = params => axios.post(`${SERVER.CYXDMS_CLUE}/basedata/failModels/importPackages`, params);

//导出模板